Moving picture experts group 2 (MPEG2) is a standard for generic coding of audio/video (NV) streams. Typically, an MPEG2 transport stream (TS) multiplexing module, in a MPEG2 TS system, multiplexes encoded A/V streams by interleaving the encoded A/V streams. Further, the MPEG2 TS multiplexing module packetizes and sends the interleaved encoded A/V streams in the form of TS packets to a plurality of set-top boxes and/or digital television (TVs) at different subscriber locations. Furthermore, the TS packets are buffered in decoder buffers, such as a transport buffer and a main buffer residing in the set-top boxes and/or digital TVs. In addition, the buffered TS packets are decoded and then output, at predetermined timings, to TVs connected to the set-top boxes and/or to the digital TVs.
Typically, the MPEG2 TS multiplexing module is implemented in hardware. However, the hardware implementation of the MPEG2 TS multiplexing module is targeted for a specific application domain (e.g., broadcasting, transcoding, and streaming server), a specific digital TV standard (e.g., digital video broadcasting (DVB), advanced television systems committee (ATSC)) and is not scalable to support additional features. Therefore, the hardware implementation of the MPEG2 TS multiplexing module reduces reusability across multiple application domains and multiple digital TV standards. To solve these problems, the MPEG2 TS multiplexing module is implemented in software.
Typically, the software implementation of the MPEG2 TS multiplexing module is customizable, extensible and caters to the multiple application domains and the multiple digital TV standards. The software implementation of the MPEG2 TS multiplexing module multiplexes the encoded A/V streams by interleaving the encoded A/V streams based on a timestamp associated with each of the encoded A/V streams. However, interleaving the encoded A/V streams based on the timestamp may not prevent overflow/underflow conditions of the decoder buffers. One existing approach to prevent overflow/underflow conditions of the decoder buffers is to use a feedback mechanism between the MPEG2 TS multiplexing module and a plurality of encoders in the MPEG2 TS system. However, this approach may increase complexity of the MPEG2 TS system.
Also, in the software implementation of the MPEG2 TS multiplexing module, generally, a program clock reference (PCR) of the MPEG2 TS system is set based on a system time clock (STC) of the MPEG2 TS system. However, using this approach, the PCR may not be set accurately due to an inherent delay in retrieving the STC using drivers in the MPEG2 TS system.
The drawings described herein are for illustration purposes only and are not intended to limit the scope of the present disclosure in any way.